﻿$(function () {
    $("#btnLogin").click(function () {
        $.ajax({
            url: "/User/Validate?username=" + $("#username").val() + "&userpwd=" + $("#userpwd").val(),
            type: "POST",
            cache: false,
            async: false, //是否异步请求
            dataType: "json",
            data: { action: "outlogin" },
            success: function (msg) {
                if (!msg.Success) {
                    alert("msg.Msg");
                    showAlert('登录失败', msg.Msg, 0);
                }
                else {
                    location.href = "/html/index.html";
                }
            }
        });
    });
});